package com.eastfair.venueservice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.boot.service.SuperService;
import com.eastfair.venueservice.dto.ServiceBookingDTO;
import com.eastfair.venueservice.dto.ServiceOrderDTO;
import com.eastfair.venueservice.dto.ServiceOrderOperateLogDTO;
import com.eastfair.venueservice.entity.ServiceBooking;
import com.eastfair.venueservice.entity.ServiceOrder;
import com.eastfair.venueservice.entity.ServiceOrderOperateLog;
import com.eastfair.venueservice.vo.ServiceBookingVO;
import com.eastfair.venueservice.vo.ServiceOrderOperateLogVO;

import java.util.List;

/**
 * <p>
 * 业务接口
 * 服务订单操作记录
 * </p>
 *
 * @author dqq
 * @date 2022 -12-16
 */
public interface ServiceOrderOperateLogService extends SuperService<ServiceOrderOperateLog> {

    /**
     * 分页查询订单操作记录VO列表.
     *
     * @param params the params
     * @return the page
     */
    Page<ServiceOrderOperateLogVO> listServiceOrderOperateLogVO(PageParams<ServiceOrderOperateLogDTO> params);

    /**
     * 保存订单操作记录.
     *
     * @param serviceOrderOperateLogDTO the service order operate log dto
     * @return the service order operate log
     */
    ServiceOrderOperateLog saveServiceOrderOperateLog(ServiceOrderOperateLogDTO serviceOrderOperateLogDTO);

    /**
     * 更新订单操作记录.
     *
     * @param serviceOrderOperateLogDTO the service order operate log dto
     * @return the service order operate log
     */
    ServiceOrderOperateLog updateServiceOrderOperateLog(ServiceOrderOperateLogDTO serviceOrderOperateLogDTO);

    /**
     * 记录添加订单服务日志.
     *
     * @param newServiceBookingList the service booking list
     * @param oldServiceBookingList the old service booking list
     * @return the boolean
     */
    boolean logAddOrderService(List<ServiceBookingDTO> newServiceBookingList, List<ServiceBooking> oldServiceBookingList);

    /**
     * 记录修改订单服务日志.
     *
     * @param newServiceBookingList the service booking list
     * @param oldServiceBookingList the old service booking list
     * @return the boolean
     */
    boolean logUpdateOrderService(List<ServiceBookingDTO> newServiceBookingList, List<ServiceBooking> oldServiceBookingList);

    /**
     * 记录修改订单金额日志.
     *
     * @param newServiceOrder the service order dto
     * @param oldServiceOrder the old service order
     * @return the boolean
     */
    boolean logUpdateOrderAmount(ServiceOrder newServiceOrder, ServiceOrder oldServiceOrder);

    /**
     * 记录取消订单日志.
     *
     * @param serviceOrderDTO the service order dto
     * @return the boolean
     */
    boolean logCancelServiceOrder(ServiceOrder serviceOrderDTO);

    /**
     * 记录申请订单开票日志.
     *
     * @param serviceOrderDTO the service order dto
     * @return the boolean
     */
    boolean logApplyOrderInvoice(ServiceOrderDTO serviceOrderDTO);

    /**
     * 异步记录添加订单服务日志.
     *
     * @param newServiceBookingList the service booking list
     * @param oldServiceBookingList the old service booking list
     */
    void asyncLogAddOrderService(List<ServiceBookingDTO> newServiceBookingList, List<ServiceBooking> oldServiceBookingList);

    /**
     * 异步记录修改订单服务日志.
     *
     * @param newServiceBookingList the service booking list
     * @param oldServiceBookingList the old service booking list
     */
    void asyncLogUpdateOrderService(List<ServiceBookingDTO> newServiceBookingList, List<ServiceBooking> oldServiceBookingList);

    /**
     * 异步记录修改订单金额日志.
     *
     * @param newServiceOrder the new service order
     * @param oldServiceOrder the old service order
     */
    void asyncLogUpdateOrderAmount(ServiceOrder newServiceOrder, ServiceOrder oldServiceOrder);

    /**
     * 异步记录取消订单日志.
     *
     * @param serviceOrder the service order dto
     */
    void asyncLogCancelServiceOrder(ServiceOrder serviceOrder);

}
